package com.gxb.codebook.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DBUtils {
    public static final String DATABASE_NAME = "mmb.db"; // 数据库名
    public static final int DATABASE_VERSION = 2; // 数据库版本

    // Note 表的常量
    public static final String NOTE_TABLE = "Note"; // 表名
    public static final String NOTE_ID = "id";
    public static final String NOTE_CONTENT = "content";
    public static final String NOTE_TIME = "notetime";

    // Passwd_Note 表的常量
    public static final String PASSWD_NOTE_TABLE = "Passwd_Note"; // 表名
    public static final String PASSWD_NOTE_ID = "id";
    public static final String PASSWD_NOTE_USER = "user";
    public static final String PASSWD_NOTE_NAME = "name";
    public static final String PASSWD_NOTE_PASSWD = "passwd";
    public static final String PASSWD_NOTE_TEXT = "text";
    public static final String PASSWD_NOTE_TIME = "notetime";

    // 获取当前日期
    public static String getTime() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
        Date date = new Date(System.currentTimeMillis());
        return simpleDateFormat.format(date);
    }
}
